#light 

open Langexplr.Abc
open System.IO


let loadedFile =
      using(new BinaryReader(new FileStream("code.abc",FileMode.Open))) 
           (fun aInput -> AbcFile.ReadFrom(aInput))


let loadedScript = 
    AvmScript.Create(loadedFile.Scripts.[0],
                     loadedFile.Methods,
                     loadedFile.MethodBodies,
                     loadedFile.Instances,
                     loadedFile.ConstantPool,[||]);

Array.iter 
   (fun (x:AbcFileInstruction) -> printf "%s\n" x.Name)
   (loadedScript.InitMethod.Body.Value.Instructions)
